unit u_consultapadraoabaswizard;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, u_consultapadraoabas, ImgList, AdvOfficePager,
  AdvOfficePagerStylers, Grids, DBGrids, JvExDBGrids, JvDBGrid, StdCtrls,
  AdvEdit, AdvGlowButton, ExtCtrls, Buttons, ToolWin, JvExForms,
  JvScrollPanel, FMTBcd, DB, DBClient, Provider, SqlExpr, JvExControls,
  JvPageList, AdvAppStyler, AdvSmoothStepControl, AdvDBLookupComboBox,
  frm_empresafilial;

type
  TFRM_ConsultaPadraoAbasWizard = class(TFRM_ConsultaPadraoAbas)
    AbaRegistroWizard: TAdvOfficePage;
    pnlFormulario01: TPanel;
    pnlTitulo: TPanel;
    Image2: TImage;
    pnlOperacao: TPanel;
    Etapas: TAdvSmoothStepControl;
    plEtapas: TJvPageList;
    btnAnterior: TAdvGlowButton;
    btnProximo: TAdvGlowButton;
    btnCancelar: TAdvGlowButton;
    btnFinalizar: TAdvGlowButton;
    AbaRegistroAlterar: TAdvOfficePage;
    pnlFormulario02: TPanel;
    Panel2: TPanel;
    Image1: TImage;
    Panel3: TPanel;
    btnGravar: TAdvGlowButton;
    btnFechar: TAdvGlowButton;
    AdvFormStyler: TAdvFormStyler;
    dsConsulta: TDataSource;
    dsRegistro: TDataSource;
    procedure btnNovoClick(Sender: TObject);
    procedure FormShow(Sender: TObject);
    procedure btnAlterarClick(Sender: TObject);
    procedure btnCancelarClick(Sender: TObject);
    procedure btnFecharClick(Sender: TObject);
    procedure AbaRegistroWizardShow(Sender: TObject);
    procedure AbaRegistroAlterarShow(Sender: TObject);
    procedure EtapasStepClick(Sender: TObject; StepIndex: Integer;
      StepMode: TStepMode);

  public

  end;

var
  FRM_ConsultaPadraoAbasWizard: TFRM_ConsultaPadraoAbasWizard;

implementation

uses u_dm_geral;

{$R *.dfm}

procedure TFRM_ConsultaPadraoAbasWizard.FormShow(Sender: TObject);
begin
  inherited;
  AbaRegistroWizard.TabVisible  := false;
  AbaRegistroAlterar.TabVisible := false;
end;

procedure TFRM_ConsultaPadraoAbasWizard.btnNovoClick(Sender: TObject);
begin
  inherited;
  AbaRegistroWizard.TabVisible  := true;
  AbaRegistroAlterar.TabVisible := false;
  AdvOfficePager.ActivePage     := AbaRegistroWizard;
end;

procedure TFRM_ConsultaPadraoAbasWizard.btnAlterarClick(Sender: TObject);
begin
  inherited;
  AbaRegistroAlterar.TabVisible := true;
  AbaRegistroWizard.TabVisible  := false;
  AdvOfficePager.ActivePage     := AbaRegistroAlterar;
end;

procedure TFRM_ConsultaPadraoAbasWizard.btnCancelarClick(Sender: TObject);
begin
  inherited;
  AbaRegistroWizard.TabVisible := false;
  AdvOfficePager.ActivePage    := AbaConsulta;
end;

procedure TFRM_ConsultaPadraoAbasWizard.btnFecharClick(Sender: TObject);
begin
  inherited;
  AbaRegistroAlterar.TabVisible := false;
  AdvOfficePager.ActivePage     := AbaConsulta;
end;

procedure TFRM_ConsultaPadraoAbasWizard.AbaRegistroWizardShow(Sender: TObject);
begin
  inherited;
  pnlFormulario01.Left := (Self.Width  - pnlFormulario01.Width)  div 2;
  //pnlFormulario02.Top  := (Self.Height - pnlFormulario02.Height) div 2;
end;

procedure TFRM_ConsultaPadraoAbasWizard.AbaRegistroAlterarShow(Sender: TObject);
begin
  inherited;
  pnlFormulario02.Left := (Self.Width  - pnlFormulario02.Width)  div 2;
  //pnlFormulario02.Top  := (Self.Height - pnlFormulario02.Height) div 2;
end;

procedure TFRM_ConsultaPadraoAbasWizard.EtapasStepClick(Sender: TObject;
  StepIndex: Integer; StepMode: TStepMode);
begin
  inherited;
  Etapas.ActiveStep := plEtapas.Pages[plEtapas.ActivePage.PageIndex].PageIndex;
end;

end.
